package cn.tedu.baking.mapper;

import cn.tedu.baking.pojo.entity.Content;
import cn.tedu.baking.pojo.vo.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ContentMapper {
    int insert(Content content);

    List<ContentManagementVO> selectForManagementByTypeAndUserId(Long type, Long userId);

    int deleteById(Long id);

    ContentUpdateVO selectForUpdateById(Long id);

    int update(Content content);

    List<ContentIndexVO> selectForIndexByTypeAndCategoryId(Long type, Long categoryId);

    ContentDetailVO selectDetailById(Long id);

    List<ContentSimpleVO> selectOtherListByUserId(Long id);

    List<ContentSimpleVO> selectHotList();

    int updateViewCountById(Long id);

    List<ContentIndexVO> selectListByType(long type);

    List<ContentIndexVO> selectByWd(String wd);

    List<ContentAdminVO> selectListForAdminByType(Long type);

    int updateCommentCountById(Long contentId);
}
